/**
 * 
 */
package com.java.test.paymanage.dto;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

/**
 * @author 充值优惠
 */
public class RechargeDiscountInfo implements RowMapper<RechargeDiscountInfo>{

	// 主键
	private int id;

	// 优惠名称
	private String discountName;

	// 充值金额
	private double amount;

	// 优惠幅度
	private double discountRange;

	// 到账金额
	private double receivedAmount;

	// 大码备注
	private int multiple;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getDiscountName() {
		return discountName;
	}

	public void setDiscountName(String discountName) {
		this.discountName = discountName;
	}

	public double getAmount() {
		return amount;
	}

	public void setAmount(double amount) {
		this.amount = amount;
	}

	public double getDiscountRange() {
		return discountRange;
	}

	public void setDiscountRange(double discountRange) {
		this.discountRange = discountRange;
	}

	public double getReceivedAmount() {
		return receivedAmount;
	}

	public void setReceivedAmount(double receivedAmount) {
		this.receivedAmount = receivedAmount;
	}

	public int getMultiple() {
		return multiple;
	}

	public void setMultiple(int multiple) {
		this.multiple = multiple;
	}

	@Override
	public RechargeDiscountInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
	
		RechargeDiscountInfo info  = new RechargeDiscountInfo();
		
		info.setId(rs.getInt("id"));

		info.setDiscountName(rs.getString("discount_name"));
		info.setDiscountRange(rs.getDouble("discount_range"));
		info.setMultiple(rs.getInt("multiple"));
		info.setAmount(rs.getDouble("amount"));
		info.setReceivedAmount(rs.getDouble("received_amount"));
		
		return info;
	}

}
